Algorithm driven medication titration